<?php include('brand_header.php');?>
<script type="text/javascript">
function favorite(uid,recommendid){
	$.ajax({
		url: 'index.php?mod=brandindex&code=nav',
		type: 'GET',
		dataType: 'text',
		cache:false,
		data: 'uid='+uid+'&recommendid='+recommendid,
		success: function(d){
		 if(d=='re'){
				art.dialog({
				title: '提示', 
				content:'请先登录！',
				time: 3000
			})	
		 }else{
		  $('#sc_'+recommendid).html(d);
			art.dialog({
				title: '提示', 
				content:d,
				time: 1000
			})	
		 }
		}	
	})
}
function recommend(uid,id){
	$.ajax({
		url: 'index.php?mod=brandindex&code=nav',
		type: 'GET',
		dataType: 'text',
		cache:false,
		data: 'uid='+uid+'&id='+id,
		success: function(d){
		    if(d=='re'){
				art.dialog({
				title: '提示', 
				content:'请先登录！',
				time: 3000
			})	
		 }else{
		  $('#tj_'+recommendid).html(d);
			art.dialog({
				title: '提示', 
				content:d,
				time: 1000
			})	
		 }
		}	
	})
}

</script>
<!--主体内容-->
<div class="brand_nav">
  <div id="brand_nav_left">
  	<div class="title">品牌分类</div>
  	<div class="nav">
    	<ul>
		<?php foreach($brandtype_list as  $key=>$vals){?>
        <li class="menu">+ <?php echo $key;?></li>
		<?php foreach($vals as $val){?>
        <li><a href="index.php?mod=brandindex&code=nav&serid=<?php echo  $val[0];?>"><?php echo  $val[1];?></a></li>
       <?php }}?>
        </ul>
    </div>
  </div>
  <div id="brand_nav_right">
  	<div class="brand_nav_right">
    	<div class="bread"><a href="index.php">首页</a> > <a href="###">品牌导航</a></div>
    	<div class="assort">
    		<dl>
            	<dt>品牌：</dt>
                <dd class="assort_brand_all"><a href="index.php?mod=brandindex&code=nav" class="this">不限</a></dd>
                <dd class="assort_brand"><?php echo $brandseri;?><a href="#" class="other">显示全部</a></dd>
  			<div class="float_both"></div>
            </dl>
    		<dl class="assort_border">
            	<dt>上市时间：</dt>
                <dd><a href="index.php?mod=brandindex&code=nav&year=2012" class="this">2012年</a><a href="index.php?mod=brandindex&code=nav&year=2011">2011年</a><a href="index.php?mod=brandindex&code=nav&year=2010">2010年</a><a href="index.php?mod=brandindex&code=nav&year=2009">2009年</a></dd>
            </dl>
            <div class="float_both"></div>
    		<dl class="assort_border">
            	<dt>焦油量：</dt>
                <dd><?php echo $tar_list;?></dd>
            </dl>
            <div class="float_both"></div>
    	</div>
    	<div class="list_title">
        	<span class="selected"><select name="selected">
        	  <option selected="selected">默认排序</option>
        	  <option>价格从低到高</option>
        	</select></span>
            <span class="selected_q"><a href="index.php?mod=brandindex&code=nav&price=asc">价格↑</a> <a href="index.php?mod=brandindex&code=nav&renqi=desc" class="this">人气↓</a></span>
            <ul class="pagelist">
            <?php echo $page_arr['html'];?>
          </ul>
 		 <div class="float_both"></div>
   	  </div>
	  <?php foreach($navtobacco as $tobaccos){?>
       <div class="list"> 
			<span class="img"><a href="index.php?mod=brandindex&code=detail&ids=<?php echo $tobaccos['id']; ?>"><img src="images/brand/<?php echo $tobaccos['pic'];?>" /></a></span>
			<span class="name"><a href="index.php?mod=brandindex&code=detail&ids=<?php echo $tobaccos['id']; ?>"><?php echo $tobaccos['tobacco_name'];?></a></span>
  		    <span class="present"><?php echo $tobaccos['intro'];?></span>
        	<span class="price">批发价：<i><?php echo $tobaccos['w_price'];?></i>&nbsp;&nbsp;&nbsp;零售指导价：<i><?php echo $tobaccos['r_price'];?></i></span>
			<span class="collect"><a href="javascript:void(0);" onclick="favorite('<?php echo $_COOKIE['MEMBER_ID']; ?>','<?php echo $tobaccos['id']; ?>')" id="sc_<?php echo $tobaccos['id']; ?>">收藏</a> <a href="javascript:void(0);" onclick="recommend('<?php echo $_COOKIE['MEMBER_ID']; ?>','<?php echo $tobaccos['id']; ?>')" id="tj_<?php echo $tobaccos['id']; ?>">推荐</a> </span>
           
        </div>
		<?php }?>
    	<div class="float_both"></div>
        <ul class="pagelist mt12">
           <?php echo $page_arr['html'];?>
		</ul>
  		<div class="float_both"></div>
	</div>
  </div>
  <div class="float_both"></div>
</div>
<!--底部-->
<?php include_once 'brand_footer.php' ;?>
